package org.windowkit.toolkit.util;

public class FormatUtils {

    /**
     * Utility function that takes in a String and removes any '\n' and leading
     * white space that may have been added for formatting reasons.
     * <p>
     * e.g.
     *
     * removeStringFormatting(" MR\nDescription") = "MR Description"
     *
     * @param in
     *            the String to remove formatting on
     * @return The string without any new line chars or leading white space.
     */
    public static String removeStringFormatting(final String in) {
    	return (in != null ? in.replaceAll("\n", " ").trim() : null);
	}
}
